home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / MIDI.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  15.1 KB  |  777 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        MIDI.a
  3. ;
  4. ;    Contains:    MIDI Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__MIDI__') = 'UNDEFINED' THEN
  21. __MIDI__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  25.     include 'Errors.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  30.     include 'Types.a'
  31.     ENDIF
  32.  
  33.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  34.     include 'MixedMode.a'
  35.     ENDIF
  36.  
  37. midiToolNum                        EQU        4                    ;tool number of MIDI Manager for SndDispVersion call
  38. midiMaxNameLen                    EQU        31                    ;maximum number of characters in port and client names
  39. ; Time formats 
  40. midiFormatMSec                    EQU        0                    ;milliseconds
  41. midiFormatBeats                    EQU        1                    ;beats
  42. midiFormat24fpsBit                EQU        2                    ;24 frames/sec.
  43. midiFormat25fpsBit                EQU        3                    ;25 frames/sec.
  44. midiFormat30fpsDBit                EQU        4                    ;30 frames/sec. drop-frame
  45. midiFormat30fpsBit                EQU        5                    ;30 frames/sec.
  46. midiFormat24fpsQF                EQU        6                    ;24 frames/sec. longInt format 
  47. midiFormat25fpsQF                EQU        7                    ;25 frames/sec. longInt format 
  48. midiFormat30fpsDQF                EQU        8                    ;30 frames/sec. drop-frame longInt format 
  49. midiFormat30fpsQF                EQU        9                    ;30 frames/sec. longInt format 
  50. midiInternalSync                EQU        0                    ;internal sync
  51. midiExternalSync                EQU        1                    ;external sync
  52. ; Port types
  53. midiPortTypeTime                EQU        0                    ;time port
  54. midiPortTypeInput                EQU        1                    ;input port
  55. midiPortTypeOutput                EQU        2                    ;output port
  56. midiPortTypeTimeInv                EQU        3                    ;invisible time port
  57. ; OffsetTimes  
  58. midiGetEverything                EQU        $7FFFFFFF            ;get all packets, regardless of time stamps
  59. midiGetNothing                    EQU        $80000000            ;get no packets, regardless of time stamps
  60. midiGetCurrent                    EQU        $00000000            ;get current packets only
  61.  
  62. ;    MIDI data and messages are passed in MIDIPacket records (see below).
  63. ;    The first byte of every MIDIPacket contains a set of flags
  64. ;
  65. ;    bits 0-1    00 = new MIDIPacket, not continued
  66. ;                     01 = begining of continued MIDIPacket
  67. ;                     10 = end of continued MIDIPacket
  68. ;                     11 = continuation
  69. ;    bits 2-3     reserved
  70. ;
  71. ;    bits 4-6      000 = packet contains MIDI data
  72. ;
  73. ;                  001 = packet contains MIDI Manager message
  74. ;
  75. ;    bit 7         0 = MIDIPacket has valid stamp
  76. ;                  1 = stamp with current clock
  77. ;
  78. midiContMask                    EQU        $03
  79. midiNoCont                        EQU        $00
  80. midiStartCont                    EQU        $01
  81. midiMidCont                        EQU        $03
  82. midiEndCont                        EQU        $02
  83. midiTypeMask                    EQU        $70
  84. midiMsgType                        EQU        $00
  85. midiMgrType                        EQU        $10
  86. midiTimeStampMask                EQU        $80
  87. midiTimeStampCurrent            EQU        $80
  88. midiTimeStampValid                EQU        $00
  89. ; MIDIPacket command words (the first word in the data field for midiMgrType messages) 
  90. midiOverflowErr                    EQU        $0001
  91. midiSCCErr                        EQU        $0002
  92. midiPacketErr                    EQU        $0003
  93. ;all command words less than this value are error indicators
  94. midiMaxErr                        EQU        $00FF
  95. ; Valid results to be returned by readHooks 
  96. midiKeepPacket                    EQU        0
  97. midiMorePacket                    EQU        1
  98. midiNoMorePacket                EQU        2
  99. ; Driver calls 
  100. midiOpenDriver                    EQU        1
  101. midiCloseDriver                    EQU        2
  102.  
  103. MIDIPacket                 RECORD    0
  104. flags                     ds.b   1        ; offset: $0 (0)
  105. len                         ds.b   1        ; offset: $1 (1)
  106. tStamp                     ds.l   1        ; offset: $2 (2)
  107. data                     ds.b   249        ; offset: $6 (6)
  108.                          ORG 256
  109. sizeof                     EQU *            ; size:   $100 (256)
  110.                         ENDR
  111.  
  112. ; typedef struct MIDIPacket  MIDIPacket
  113. ; typedef MIDIPacket         *MIDIPacketPtr
  114. MIDIClkInfo             RECORD    0
  115. syncType                 ds.w   1        ; offset: $0 (0)        ;synchronization external/internal
  116. curTime                     ds.l   1        ; offset: $2 (2)        ;current value of port's clock
  117. format                     ds.w   1        ; offset: $6 (6)        ;time code format
  118. sizeof                     EQU *            ; size:   $8 (8)
  119.                         ENDR
  120.  
  121. ; typedef struct MIDIClkInfo  MIDIClkInfo
  122. MIDIIDRec                 RECORD    0
  123. clientID                 ds.l   1        ; offset: $0 (0)
  124. portID                     ds.l   1        ; offset: $4 (4)
  125. sizeof                     EQU *            ; size:   $8 (8)
  126.                         ENDR
  127.  
  128. ; typedef struct MIDIIDRec     MIDIIDRec
  129. MIDIPortInfo             RECORD    0
  130. portType                 ds.w   1        ; offset: $0 (0)        ;type of port
  131. timeBase                 ds     MIDIIDRec ; offset: $2 (2)        ;MIDIIDRec for time base
  132. numConnects                 ds.w   1        ; offset: $A (10)        ;number of connections
  133. cList                     ds     MIDIIDRec ; offset: $C (12)        ;ARRAY [1..numConnects] of MIDIIDRec
  134. sizeof                     EQU *            ; size:   $14 (20)
  135.                         ENDR
  136.  
  137. ; typedef struct MIDIPortInfo  MIDIPortInfo
  138. ; typedef MIDIPortInfo         *MIDIPortInfoPtr, **MIDIPortInfoHdl, **MIDIPortInfoHandle
  139. MIDIPortParams             RECORD    0
  140. portID                     ds.l   1        ; offset: $0 (0)        ;ID of port, unique within client
  141. portType                 ds.w   1        ; offset: $4 (4)        ;Type of port - input, output, time, etc.
  142. timeBase                 ds.w   1        ; offset: $6 (6)        ;refnum of time base, 0 if none
  143. offsetTime                 ds.l   1        ; offset: $8 (8)        ;offset for current time stamps
  144. readHook                 ds.l   1        ; offset: $C (12)        ;routine to call when input data is valid
  145. refCon                     ds.l   1        ; offset: $10 (16)        ;refcon for port (for client use)
  146. initClock                 ds     MIDIClkInfo ; offset: $14 (20)    ;initial settings for a time base
  147. name                     ds.l   64        ; offset: $1C (28)        ;name of the port, This is a real live string, not a ptr.
  148. sizeof                     EQU *            ; size:   $11C (284)
  149.                         ENDR
  150.  
  151. ; typedef struct MIDIPortParams  MIDIPortParams
  152. ; typedef MIDIPortParams     *MIDIPortParamsPtr
  153. MIDIIDList                 RECORD    0
  154. numIDs                     ds.w   1        ; offset: $0 (0)
  155. list                     ds.l   1        ; offset: $2 (2)
  156. sizeof                     EQU *            ; size:   $6 (6)
  157.                         ENDR
  158.  
  159. ; typedef struct MIDIIDList  MIDIIDList
  160. ; typedef MIDIIDList         *MIDIIDListPtr, **MIDIIDListHdl, **MIDIIDListHandle
  161. ;
  162. ; pascal NumVersion MIDIVersion(void)
  163. ;
  164.     IF ¬ GENERATINGCFM THEN
  165.         Macro
  166.         _MIDIVersion
  167.             dc.w     $203C
  168.             dc.w     $0000
  169.             dc.w     $0004
  170.             dc.w     $A800
  171.         EndM
  172.     ELSE
  173.         IMPORT_CFM_FUNCTION    MIDIVersion
  174.     ENDIF
  175.  
  176. ;
  177. ; pascal OSErr MIDISignIn(OSType clientID, long refCon, Handle icon, ConstStr255Param name)
  178. ;
  179.     IF ¬ GENERATINGCFM THEN
  180.         Macro
  181.         _MIDISignIn
  182.             dc.w     $203C
  183.             dc.w     $0004
  184.             dc.w     $0004
  185.             dc.w     $A800
  186.         EndM
  187.     ELSE
  188.         IMPORT_CFM_FUNCTION    MIDISignIn
  189.     ENDIF
  190.  
  191. ;
  192. ; pascal void MIDISignOut(OSType clientID)
  193. ;
  194.     IF ¬ GENERATINGCFM THEN
  195.         Macro
  196.         _MIDISignOut
  197.             dc.w     $203C
  198.             dc.w     $0008
  199.             dc.w     $0004
  200.             dc.w     $A800
  201.         EndM
  202.     ELSE
  203.         IMPORT_CFM_FUNCTION    MIDISignOut
  204.     ENDIF
  205.  
  206. ;
  207. ; pascal MIDIIDListHandle MIDIGetClients(void)
  208. ;
  209.     IF ¬ GENERATINGCFM THEN
  210.         Macro
  211.         _MIDIGetClients
  212.             dc.w     $203C
  213.             dc.w     $000C
  214.             dc.w     $0004
  215.             dc.w     $A800
  216.         EndM
  217.     ELSE
  218.         IMPORT_CFM_FUNCTION    MIDIGetClients
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal void MIDIGetClientName(OSType clientID, Str255 name)
  223. ;
  224.     IF ¬ GENERATINGCFM THEN
  225.         Macro
  226.         _MIDIGetClientName
  227.             dc.w     $203C
  228.             dc.w     $0010
  229.             dc.w     $0004
  230.             dc.w     $A800
  231.         EndM
  232.     ELSE
  233.         IMPORT_CFM_FUNCTION    MIDIGetClientName
  234.     ENDIF
  235.  
  236. ;
  237. ; pascal void MIDISetClientName(OSType clientID, ConstStr255Param name)
  238. ;
  239.     IF ¬ GENERATINGCFM THEN
  240.         Macro
  241.         _MIDISetClientName
  242.             dc.w     $203C
  243.             dc.w     $0014
  244.             dc.w     $0004
  245.             dc.w     $A800
  246.         EndM
  247.     ELSE
  248.         IMPORT_CFM_FUNCTION    MIDISetClientName
  249.     ENDIF
  250.  
  251. ;
  252. ; pascal MIDIIDListHandle MIDIGetPorts(OSType clientID)
  253. ;
  254.     IF ¬ GENERATINGCFM THEN
  255.         Macro
  256.         _MIDIGetPorts
  257.             dc.w     $203C
  258.             dc.w     $0018
  259.             dc.w     $0004
  260.             dc.w     $A800
  261.         EndM
  262.     ELSE
  263.         IMPORT_CFM_FUNCTION    MIDIGetPorts
  264.     ENDIF
  265.  
  266. ;
  267. ; pascal OSErr MIDIAddPort(OSType clientID, short BufSize, short *refnum, MIDIPortParamsPtr init)
  268. ;
  269.     IF ¬ GENERATINGCFM THEN
  270.         Macro
  271.         _MIDIAddPort
  272.             dc.w     $203C
  273.             dc.w     $001C
  274.             dc.w     $0004
  275.             dc.w     $A800
  276.         EndM
  277.     ELSE
  278.         IMPORT_CFM_FUNCTION    MIDIAddPort
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal MIDIPortInfoHandle MIDIGetPortInfo(OSType clientID, OSType portID)
  283. ;
  284.     IF ¬ GENERATINGCFM THEN
  285.         Macro
  286.         _MIDIGetPortInfo
  287.             dc.w     $203C
  288.             dc.w     $0020
  289.             dc.w     $0004
  290.             dc.w     $A800
  291.         EndM
  292.     ELSE
  293.         IMPORT_CFM_FUNCTION    MIDIGetPortInfo
  294.     ENDIF
  295.  
  296. ;
  297. ; pascal OSErr MIDIConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  298. ;
  299.     IF ¬ GENERATINGCFM THEN
  300.         Macro
  301.         _MIDIConnectData
  302.             dc.w     $203C
  303.             dc.w     $0024
  304.             dc.w     $0004
  305.             dc.w     $A800
  306.         EndM
  307.     ELSE
  308.         IMPORT_CFM_FUNCTION    MIDIConnectData
  309.     ENDIF
  310.  
  311. ;
  312. ; pascal OSErr MIDIUnConnectData(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  313. ;
  314.     IF ¬ GENERATINGCFM THEN
  315.         Macro
  316.         _MIDIUnConnectData
  317.             dc.w     $203C
  318.             dc.w     $0028
  319.             dc.w     $0004
  320.             dc.w     $A800
  321.         EndM
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION    MIDIUnConnectData
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal OSErr MIDIConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  328. ;
  329.     IF ¬ GENERATINGCFM THEN
  330.         Macro
  331.         _MIDIConnectTime
  332.             dc.w     $203C
  333.             dc.w     $002C
  334.             dc.w     $0004
  335.             dc.w     $A800
  336.         EndM
  337.     ELSE
  338.         IMPORT_CFM_FUNCTION    MIDIConnectTime
  339.     ENDIF
  340.  
  341. ;
  342. ; pascal OSErr MIDIUnConnectTime(OSType srcClID, OSType srcPortID, OSType dstClID, OSType dstPortID)
  343. ;
  344.     IF ¬ GENERATINGCFM THEN
  345.         Macro
  346.         _MIDIUnConnectTime
  347.             dc.w     $203C
  348.             dc.w     $0030
  349.             dc.w     $0004
  350.             dc.w     $A800
  351.         EndM
  352.     ELSE
  353.         IMPORT_CFM_FUNCTION    MIDIUnConnectTime
  354.     ENDIF
  355.  
  356. ;
  357. ; pascal void MIDIFlush(short refnum)
  358. ;
  359.     IF ¬ GENERATINGCFM THEN
  360.         Macro
  361.         _MIDIFlush
  362.             dc.w     $203C
  363.             dc.w     $0034
  364.             dc.w     $0004
  365.             dc.w     $A800
  366.         EndM
  367.     ELSE
  368.         IMPORT_CFM_FUNCTION    MIDIFlush
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal ProcPtr MIDIGetReadHook(short refnum)
  373. ;
  374.     IF ¬ GENERATINGCFM THEN
  375.         Macro
  376.         _MIDIGetReadHook
  377.             dc.w     $203C
  378.             dc.w     $0038
  379.             dc.w     $0004
  380.             dc.w     $A800
  381.         EndM
  382.     ELSE
  383.         IMPORT_CFM_FUNCTION    MIDIGetReadHook
  384.     ENDIF
  385.  
  386. ;
  387. ; pascal void MIDISetReadHook(short refnum, ProcPtr hook)
  388. ;
  389.     IF ¬ GENERATINGCFM THEN
  390.         Macro
  391.         _MIDISetReadHook
  392.             dc.w     $203C
  393.             dc.w     $003C
  394.             dc.w     $0004
  395.             dc.w     $A800
  396.         EndM
  397.     ELSE
  398.         IMPORT_CFM_FUNCTION    MIDISetReadHook
  399.     ENDIF
  400.  
  401. ;
  402. ; pascal void MIDIGetPortName(OSType clientID, OSType portID, Str255 name)
  403. ;
  404.     IF ¬ GENERATINGCFM THEN
  405.         Macro
  406.         _MIDIGetPortName
  407.             dc.w     $203C
  408.             dc.w     $0040
  409.             dc.w     $0004
  410.             dc.w     $A800
  411.         EndM
  412.     ELSE
  413.         IMPORT_CFM_FUNCTION    MIDIGetPortName
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal void MIDISetPortName(OSType clientID, OSType portID, ConstStr255Param name)
  418. ;
  419.     IF ¬ GENERATINGCFM THEN
  420.         Macro
  421.         _MIDISetPortName
  422.             dc.w     $203C
  423.             dc.w     $0044
  424.             dc.w     $0004
  425.             dc.w     $A800
  426.         EndM
  427.     ELSE
  428.         IMPORT_CFM_FUNCTION    MIDISetPortName
  429.     ENDIF
  430.  
  431. ;
  432. ; pascal void MIDIWakeUp(short refnum, long time, long period, MIDITimeUPP timeProc)
  433. ;
  434.     IF ¬ GENERATINGCFM THEN
  435.         Macro
  436.         _MIDIWakeUp
  437.             dc.w     $203C
  438.             dc.w     $0048
  439.             dc.w     $0004
  440.             dc.w     $A800
  441.         EndM
  442.     ELSE
  443.         IMPORT_CFM_FUNCTION    MIDIWakeUp
  444.     ENDIF
  445.  
  446. ;
  447. ; pascal void MIDIRemovePort(short refnum)
  448. ;
  449.     IF ¬ GENERATINGCFM THEN
  450.         Macro
  451.         _MIDIRemovePort
  452.             dc.w     $203C
  453.             dc.w     $004C
  454.             dc.w     $0004
  455.             dc.w     $A800
  456.         EndM
  457.     ELSE
  458.         IMPORT_CFM_FUNCTION    MIDIRemovePort
  459.     ENDIF
  460.  
  461. ;
  462. ; pascal short MIDIGetSync(short refnum)
  463. ;
  464.     IF ¬ GENERATINGCFM THEN
  465.         Macro
  466.         _MIDIGetSync
  467.             dc.w     $203C
  468.             dc.w     $0050
  469.             dc.w     $0004
  470.             dc.w     $A800
  471.         EndM
  472.     ELSE
  473.         IMPORT_CFM_FUNCTION    MIDIGetSync
  474.     ENDIF
  475.  
  476. ;
  477. ; pascal void MIDISetSync(short refnum, short sync)
  478. ;
  479.     IF ¬ GENERATINGCFM THEN
  480.         Macro
  481.         _MIDISetSync
  482.             dc.w     $203C
  483.             dc.w     $0054
  484.             dc.w     $0004
  485.             dc.w     $A800
  486.         EndM
  487.     ELSE
  488.         IMPORT_CFM_FUNCTION    MIDISetSync
  489.     ENDIF
  490.  
  491. ;
  492. ; pascal long MIDIGetCurTime(short refnum)
  493. ;
  494.     IF ¬ GENERATINGCFM THEN
  495.         Macro
  496.         _MIDIGetCurTime
  497.             dc.w     $203C
  498.             dc.w     $0058
  499.             dc.w     $0004
  500.             dc.w     $A800
  501.         EndM
  502.     ELSE
  503.         IMPORT_CFM_FUNCTION    MIDIGetCurTime
  504.     ENDIF
  505.  
  506. ;
  507. ; pascal void MIDISetCurTime(short refnum, long time)
  508. ;
  509.     IF ¬ GENERATINGCFM THEN
  510.         Macro
  511.         _MIDISetCurTime
  512.             dc.w     $203C
  513.             dc.w     $005C
  514.             dc.w     $0004
  515.             dc.w     $A800
  516.         EndM
  517.     ELSE
  518.         IMPORT_CFM_FUNCTION    MIDISetCurTime
  519.     ENDIF
  520.  
  521. ;
  522. ; pascal void MIDIStartTime(short refnum)
  523. ;
  524.     IF ¬ GENERATINGCFM THEN
  525.         Macro
  526.         _MIDIStartTime
  527.             dc.w     $203C
  528.             dc.w     $0060
  529.             dc.w     $0004
  530.             dc.w     $A800
  531.         EndM
  532.     ELSE
  533.         IMPORT_CFM_FUNCTION    MIDIStartTime
  534.     ENDIF
  535.  
  536. ;
  537. ; pascal void MIDIStopTime(short refnum)
  538. ;
  539.     IF ¬ GENERATINGCFM THEN
  540.         Macro
  541.         _MIDIStopTime
  542.             dc.w     $203C
  543.             dc.w     $0064
  544.             dc.w     $0004
  545.             dc.w     $A800
  546.         EndM
  547.     ELSE
  548.         IMPORT_CFM_FUNCTION    MIDIStopTime
  549.     ENDIF
  550.  
  551. ;
  552. ; pascal void MIDIPoll(short refnum, long offsetTime)
  553. ;
  554.     IF ¬ GENERATINGCFM THEN
  555.         Macro
  556.         _MIDIPoll
  557.             dc.w     $203C
  558.             dc.w     $0068
  559.             dc.w     $0004
  560.             dc.w     $A800
  561.         EndM
  562.     ELSE
  563.         IMPORT_CFM_FUNCTION    MIDIPoll
  564.     ENDIF
  565.  
  566. ;
  567. ; pascal OSErr MIDIWritePacket(short refnum, MIDIPacketPtr packet)
  568. ;
  569.     IF ¬ GENERATINGCFM THEN
  570.         Macro
  571.         _MIDIWritePacket
  572.             dc.w     $203C
  573.             dc.w     $006C
  574.             dc.w     $0004
  575.             dc.w     $A800
  576.         EndM
  577.     ELSE
  578.         IMPORT_CFM_FUNCTION    MIDIWritePacket
  579.     ENDIF
  580.  
  581. ;
  582. ; pascal Boolean MIDIWorldChanged(OSType clientID)
  583. ;
  584.     IF ¬ GENERATINGCFM THEN
  585.         Macro
  586.         _MIDIWorldChanged
  587.             dc.w     $203C
  588.             dc.w     $0070
  589.             dc.w     $0004
  590.             dc.w     $A800
  591.         EndM
  592.     ELSE
  593.         IMPORT_CFM_FUNCTION    MIDIWorldChanged
  594.     ENDIF
  595.  
  596. ;
  597. ; pascal long MIDIGetOffsetTime(short refnum)
  598. ;
  599.     IF ¬ GENERATINGCFM THEN
  600.         Macro
  601.         _MIDIGetOffsetTime
  602.             dc.w     $203C
  603.             dc.w     $0074
  604.             dc.w     $0004
  605.             dc.w     $A800
  606.         EndM
  607.     ELSE
  608.         IMPORT_CFM_FUNCTION    MIDIGetOffsetTime
  609.     ENDIF
  610.  
  611. ;
  612. ; pascal void MIDISetOffsetTime(short refnum, long offsetTime)
  613. ;
  614.     IF ¬ GENERATINGCFM THEN
  615.         Macro
  616.         _MIDISetOffsetTime
  617.             dc.w     $203C
  618.             dc.w     $0078
  619.             dc.w     $0004
  620.             dc.w     $A800
  621.         EndM
  622.     ELSE
  623.         IMPORT_CFM_FUNCTION    MIDISetOffsetTime
  624.     ENDIF
  625.  
  626. ;
  627. ; pascal long MIDIConvertTime(short srcFormat, short dstFormat, long time)
  628. ;
  629.     IF ¬ GENERATINGCFM THEN
  630.         Macro
  631.         _MIDIConvertTime
  632.             dc.w     $203C
  633.             dc.w     $007C
  634.             dc.w     $0004
  635.             dc.w     $A800
  636.         EndM
  637.     ELSE
  638.         IMPORT_CFM_FUNCTION    MIDIConvertTime
  639.     ENDIF
  640.  
  641. ;
  642. ; pascal long MIDIGetRefCon(short refnum)
  643. ;
  644.     IF ¬ GENERATINGCFM THEN
  645.         Macro
  646.         _MIDIGetRefCon
  647.             dc.w     $203C
  648.             dc.w     $0080
  649.             dc.w     $0004
  650.             dc.w     $A800
  651.         EndM
  652.     ELSE
  653.         IMPORT_CFM_FUNCTION    MIDIGetRefCon
  654.     ENDIF
  655.  
  656. ;
  657. ; pascal void MIDISetRefCon(short refnum, long refCon)
  658. ;
  659.     IF ¬ GENERATINGCFM THEN
  660.         Macro
  661.         _MIDISetRefCon
  662.             dc.w     $203C
  663.             dc.w     $0084
  664.             dc.w     $0004
  665.             dc.w     $A800
  666.         EndM
  667.     ELSE
  668.         IMPORT_CFM_FUNCTION    MIDISetRefCon
  669.     ENDIF
  670.  
  671. ;
  672. ; pascal long MIDIGetClRefCon(OSType clientID)
  673. ;
  674.     IF ¬ GENERATINGCFM THEN
  675.         Macro
  676.         _MIDIGetClRefCon
  677.             dc.w     $203C
  678.             dc.w     $0088
  679.             dc.w     $0004
  680.             dc.w     $A800
  681.         EndM
  682.     ELSE
  683.         IMPORT_CFM_FUNCTION    MIDIGetClRefCon
  684.     ENDIF
  685.  
  686. ;
  687. ; pascal void MIDISetClRefCon(OSType clientID, long refCon)
  688. ;
  689.     IF ¬ GENERATINGCFM THEN
  690.         Macro
  691.         _MIDISetClRefCon
  692.             dc.w     $203C
  693.             dc.w     $008C
  694.             dc.w     $0004
  695.             dc.w     $A800
  696.         EndM
  697.     ELSE
  698.         IMPORT_CFM_FUNCTION    MIDISetClRefCon
  699.     ENDIF
  700.  
  701. ;
  702. ; pascal short MIDIGetTCFormat(short refnum)
  703. ;
  704.     IF ¬ GENERATINGCFM THEN
  705.         Macro
  706.         _MIDIGetTCFormat
  707.             dc.w     $203C
  708.             dc.w     $0090
  709.             dc.w     $0004
  710.             dc.w     $A800
  711.         EndM
  712.     ELSE
  713.         IMPORT_CFM_FUNCTION    MIDIGetTCFormat
  714.     ENDIF
  715.  
  716. ;
  717. ; pascal void MIDISetTCFormat(short refnum, short format)
  718. ;
  719.     IF ¬ GENERATINGCFM THEN
  720.         Macro
  721.         _MIDISetTCFormat
  722.             dc.w     $203C
  723.             dc.w     $0094
  724.             dc.w     $0004
  725.             dc.w     $A800
  726.         EndM
  727.     ELSE
  728.         IMPORT_CFM_FUNCTION    MIDISetTCFormat
  729.     ENDIF
  730.  
  731. ;
  732. ; pascal void MIDISetRunRate(short refnum, short rate, long time)
  733. ;
  734.     IF ¬ GENERATINGCFM THEN
  735.         Macro
  736.         _MIDISetRunRate
  737.             dc.w     $203C
  738.             dc.w     $0098
  739.             dc.w     $0004
  740.             dc.w     $A800
  741.         EndM
  742.     ELSE
  743.         IMPORT_CFM_FUNCTION    MIDISetRunRate
  744.     ENDIF
  745.  
  746. ;
  747. ; pascal Handle MIDIGetClientIcon(OSType clientID)
  748. ;
  749.     IF ¬ GENERATINGCFM THEN
  750.         Macro
  751.         _MIDIGetClientIcon
  752.             dc.w     $203C
  753.             dc.w     $009C
  754.             dc.w     $0004
  755.             dc.w     $A800
  756.         EndM
  757.     ELSE
  758.         IMPORT_CFM_FUNCTION    MIDIGetClientIcon
  759.     ENDIF
  760.  
  761. ;
  762. ; pascal long SndDispVersion(short toolnum)
  763. ;
  764.     IF ¬ GENERATINGCFM THEN
  765.         Macro
  766.         _SndDispVersion
  767.             dc.w     $203C
  768.             dc.w     $0000
  769.             dc.w     $0000
  770.             dc.w     $A800
  771.         EndM
  772.     ELSE
  773.         IMPORT_CFM_FUNCTION    SndDispVersion
  774.     ENDIF
  775.  
  776.     ENDIF ; __MIDI__
  777.